package com.stox.shared.model.enumeration;

public enum ScripType {

	EQUITY("EQUITY"), 
	MF("MF"), 
	BOND("BOND"), 
	INDEX("INDEX"), 
	FNO("FNO"), 
	CURRENCY("CURRENCY"), 
	COMMODITY("COMMODITY");
	
	private final String code;
	
	private ScripType(String code) {
		this.code = code;
	}
	
	public String getCode() {
		return code;
	}
	
	public static ScripType getByOrdinal(int ordinal){
		for(ScripType scripType : values()){
			if(ordinal == scripType.ordinal()){
				return scripType;
			}
		}
		return null;
	}
	
}
